<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>存货周转率与扣非净利润增长率趋势分析</title>
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
        }
        body {
            background: linear-gradient(135deg, #1a2a6c, #2d388a, #4a4b95);
            color: #333;
            padding: 20px;
            min-height: 100vh;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
        }
        header {
            text-align: center;
            padding: 30px 0;
            color: white;
            animation: fadeIn 1s ease-out;
        }
        h1 {
            font-size: 2.8rem;
            margin-bottom: 10px;
            text-shadow: 0 2px 10px rgba(0,0,0,0.3);
        }
        .subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
            max-width: 700px;
            margin: 0 auto;
            line-height: 1.6;
        }
        .chart-container {
            background: white;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            padding: 25px;
            margin-bottom: 30px;
            animation: slideUp 1s ease-out;
            height: 600px;
        }
        .data-highlights {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            margin: 25px 0;
            justify-content: center;
        }
        .highlight-card {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border-radius: 12px;
            padding: 20px;
            flex: 1;
            min-width: 250px;
            max-width: 350px;
            color: white;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            transition: transform 0.3s ease;
        }
        .highlight-card:hover {
            transform: translateY(-5px);
        }
        .highlight-card h3 {
            font-size: 1.1rem;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .highlight-card .value {
            font-size: 2.2rem;
            font-weight: bold;
            margin: 10px 0;
        }
        .highlight-card .trend {
            display: flex;
            align-items: center;
            font-size: 0.95rem;
            gap: 5px;
        }
        .data-description {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 25px;
            margin-top: 20px;
            color: white;
            line-height: 1.7;
        }
        .data-description h2 {
            margin-bottom: 15px;
            font-size: 1.4rem;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        footer {
            text-align: center;
            color: rgba(255, 255, 255, 0.7);
            padding: 20px;
            font-size: 0.9rem;
            margin-top: 30px;
        }
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        @keyframes slideUp {
            from { 
                opacity: 0;
                transform: translateY(30px);
            }
            to { 
                opacity: 1;
                transform: translateY(0);
            }
        }
        @media (max-width: 768px) {
            .chart-container {
                height: 450px;
                padding: 15px;
            }
            h1 {
                font-size: 2.2rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>存货周转率与扣非净利润增长率趋势分析</h1>
            <p class="subtitle">基于2007年至2024年半年度财务数据，展示存货管理效率与盈利能力的关联性</p>
        </header>
        
        <div class="data-highlights">
            <div class="highlight-card">
                <h3>📊 存货周转率趋势</h3>
                <div class="value">0.4 → 0.7</div>
                <div class="trend">整体呈上升趋势，周转效率提升75%</div>
            </div>
            <div class="highlight-card">
                <h3>💰 扣非净利润增长率</h3>
                <div class="value">-32.7% → 11.8%</div>
                <div class="trend">经历波动后趋于稳定增长</div>
            </div>
            <div class="highlight-card">
                <h3>📈 关键转折点</h3>
                <div class="value">2014年</div>
                <div class="trend">周转率与增长率同时触底回升</div>
            </div>
        </div>
        
        <div class="chart-container" id="main-chart"></div>
        
        <div class="data-description">
            <h2>🔍 数据分析洞察</h2>
            <p>从2007年至2024年的半年度数据可见，存货周转率与扣非净利润增长率存在一定的相关性：</p>
            <p>1. <strong>效率提升阶段(2014-2018)</strong>：存货周转率从0.4提升至0.56，同期扣非净利润增长率从-32.7%大幅回升至42.9%，显示存货管理效率的提升对盈利能力有显著促进作用。</p>
            <p>2. <strong>稳定发展期(2019-2024)</strong>：存货周转率稳定在0.6-0.7之间，扣非净利润增长率保持在12%-33%区间，表明企业进入稳定发展阶段。</p>
            <p>3. <strong>异常波动(2013-2014)</strong>：2014年存货周转率降至最低点(0.4)，同期扣非净利润增长率为-32.7%，需关注该时期特殊经营状况。</p>
        </div>
        
        <footer>
            <p>数据来源：存货周转率(06-24).xlsx | 可视化分析 © 2024</p>
        </footer>
    </div>

    <script>
        // 基于提供的数据
        const dates = [
            '2007-06-30', '2008-06-30', '2009-06-30', '2010-06-30', 
            '2011-06-30', '2012-06-30', '2013-06-30', '2014-06-30', 
            '2015-06-30', '2016-06-30', '2017-06-30', '2018-06-30', 
            '2019-06-30', '2020-06-30', '2021-06-30', '2022-06-30', 
            '2023-06-30', '2024-06-30','2025-06-30'
        ];
        
        const turnoverRates = [
            1.09, 1.08, 0.79, 0.68, 0.81, 0.96, 
            0.67, 0.40, 0.43, 0.45, 0.47, 0.56, 
            0.61, 0.62, 0.70, 0.69, 0.69, 0.70,0.68
        ];
        
        const profitGrowthRates = [
            null, null, 0.2093, 0.4234, 0.4817, 0.5001, 
            0.1781, -0.3274, -0.1764, 0.1805, 0.2771, 0.4290, 
            0.3256, 0.1563, 0.2090, 0.1505, 0.1212, 0.1179,0.01515
        ];
        
        // 初始化图表
        const chartDom = document.getElementById('main-chart');
        const myChart = echarts.init(chartDom);
        
        const option = {
            tooltip: {
                trigger: 'axis',
                backgroundColor: 'rgba(0,0,0,0.7)',
                borderColor: '#777',
                textStyle: {
                    color: '#fff'
                },
                formatter: function(params) {
                    const date = params[0].name;
                    let result = `<div style="font-weight:bold;margin-bottom:5px">${date}</div>`;
                    
                    params.forEach(param => {
                        const seriesName = param.seriesName;
                        let value = param.value;
                        let unit = '';
                        let color = param.color;
                        
                        if (seriesName === '存货周转率') {
                            value = value.toFixed(2);
                        } else if (seriesName === '扣非净利润增长率') {
                            value = (value * 100).toFixed(1) + '%';
                        }
                        
                        result += `
                            <div style="display:flex;align-items:center;margin:3px 0">
                                <span style="display:inline-block;width:10px;height:10px;border-radius:50%;background:${color};margin-right:5px"></span>
                                ${seriesName}: <span style="font-weight:bold;margin-left:5px">${value}</span>
                            </div>
                        `;
                    });
                    
                    return result;
                }
            },
            legend: {
                data: ['存货周转率', '扣非净利润增长率'],
                right: 30,
                top: 10,
                textStyle: {
                    color: '#666',
                    fontSize: 14
                }
            },
            grid: {
                left: '3%',
                right: '10%',
                bottom: '12%',
                top: '15%',
                containLabel: true
            },
            xAxis: {
                type: 'category',
                boundaryGap: false,
                data: dates,
                axisLine: {
                    lineStyle: {
                        color: '#666'
                    }
                },
                axisLabel: {
                    interval: 1,
                    rotate: 30,
                    formatter: function(value) {
                        return value.substring(0, 4); // 只显示年份
                    }
                }
            },
            yAxis: [
                {
                    type: 'value',
                    name: '存货周转率',
                    nameLocation: 'end',
                    nameTextStyle: {
                        padding: [0, 0, 0, 50]
                    },
                    min: 0,
                    max: 1.2,
                    axisLine: {
                        show: true,
                        lineStyle: {
                            color: '#5470C6'
                        }
                    },
                    axisLabel: {
                        formatter: '{value}'
                    }
                },
                {
                    type: 'value',
                    name: '扣非净利润增长率',
                    nameLocation: 'end',
                    nameTextStyle: {
                        padding: [0, 0, 0, 50]
                    },
                    min: -0.4,
                    max: 0.6,
                    axisLine: {
                        show: true,
                        lineStyle: {
                            color: '#91CC75'
                        }
                    },
                    axisLabel: {
                        formatter: function(value) {
                            return (value * 100).toFixed(0) + '%';
                        }
                    }
                }
            ],
            dataZoom: [
                {
                    type: 'inside',
                    start: 0,
                    end: 100
                },
                {
                    type: 'slider',
                    show: true,
                    bottom: 20,
                    start: 0,
                    end: 100,
                    height: 20
                }
            ],
            series: [
                {
                    name: '存货周转率',
                    type: 'line',
                    smooth: true,
                    symbol: 'circle',
                    symbolSize: 8,
                    lineStyle: {
                        width: 3,
                        color: '#5470C6'
                    },
                    itemStyle: {
                        color: '#5470C6',
                        borderWidth: 2,
                        borderColor: '#fff'
                    },
                    data: turnoverRates
                },
                {
                    name: '扣非净利润增长率',
                    type: 'line',
                    yAxisIndex: 1,
                    smooth: true,
                    symbol: 'circle',
                    symbolSize: 8,
                    lineStyle: {
                        width: 3,
                        color: '#91CC75'
                    },
                    itemStyle: {
                        color: '#91CC75',
                        borderWidth: 2,
                        borderColor: '#fff'
                    },
                    data: profitGrowthRates
                }
            ],
            graphic: [
                {
                    type: 'text',
                    left: 'center',
                    top: 40,
                    style: {
                        text: '存货周转率与扣非净利润增长率趋势对比',
                        font: 'bold 18px "Microsoft YaHei", sans-serif',
                        fill: '#333'
                    }
                }
            ]
        };
        
        myChart.setOption(option);
        
        // 响应窗口大小变化
        window.addEventListener('resize', function() {
            myChart.resize();
        });
    </script>
</body>
</html>